package com.demo.text;

import com.demo.entity.Student;

import java.util.*;

public class t1 {
    public static void main(String[] args) throws InterruptedException {
        t3 t3 = new t3();
        t3 t4 = new t3();
        String a = "ee";
        String b = "we";
//        t3.aa();
        System.out.println(CommEnum.HW_MESSAGE.getName());
        Map<String, String> map = new HashMap<>();
        map.put("1", "zhiiang");
        map.put("2", "zhiiang2");
        map.put("3", "zhiiang3");
        map.put("4", "zhiiang");
        Set<String> keys = map.keySet();
//        遍历map的第一种方式
//        for (String key : keys) {
//            System.out.println(map.get(key));
//        }
////        第二种方式
//        Set<Map.Entry<String, String>> entries = map.entrySet();
//        for (Map.Entry<String, String> entry : entries) {
//            System.out.println(entry.getValue());
//        }
////        第三种方式
//        map.forEach((k,v)->{
//            System.out.println(k+"-----"+v);
//        });

        List<String> list = new LinkedList<>();
        list.add("a");
        list.add("a");
        list.add("a");
        list.add("a");
        list.add("a");
//        for (String a2 : list) {
//            System.out.println(a2);
//        }
//        list.forEach(s -> System.out.println(s));
        Iterator<String> iterator = keys.iterator();
        while (iterator.hasNext()) {
            System.out.println(iterator.next());
        }

        Student student = new Student();
        Student student1 = new Student("1","zhiqiang");

    }
}
